<template>
  <el-container>
    <el-header>
      <div class="head-left">
        <img src="../assets/index-1.png" alt="" />
        <h1>云教务管理系统</h1>
      </div>
      <div class="head-right">
        <div class="right-txt" style="padding-right: 10px">
          校区：北京科技经管学院
        </div>
        <span class="el-icon-user-solid user"></span>
        <div class="sel">
          <el-dropdown>
            <span class="el-dropdown-link">
              会员中心
              <i class="el-icon-arrow-down el-icon--right"></i>
            </span>
            <template #dropdown>
              <el-dropdown-menu>
                <el-dropdown-item>账号信息</el-dropdown-item>
                <el-dropdown-item>修改密码</el-dropdown-item>
                <el-dropdown-item @click="outlogin">退出登录</el-dropdown-item>
              </el-dropdown-menu>
            </template>
          </el-dropdown>
        </div>
      </div>
    </el-header>
    <el-container>
      <el-aside width="99px">
        <ul style="padding: 0">
          <li class="menuitem">
            <router-link to="/index/index">
              <div class="menudiv">
                <i class="icon iconfont icon-home"></i>
                <div>首页</div>
              </div>
            </router-link>
          </li>
          <li class="menuitem">
            <router-link to="/student/index">
              <div class="menudiv">
                <i class="icon iconfont icon-yixiangxueyuan"></i>
                <div>学员管理</div>
              </div>
            </router-link>
          </li>
          <li class="menuitem">
            <router-link to="/class/index">
              <div class="menudiv">
                <i class="icon iconfont icon-banjiguanli"></i>
                <div>班级管理</div>
              </div>
            </router-link>
          </li>
          <li class="menuitem">
            <router-link to="/attendance/index">
              <div class="menudiv">
                <i class="icon iconfont icon-kaoqinguanli"></i>
                <div>考勤管理</div>
              </div>
            </router-link>
          </li>
          <li class="menuitem">
            <router-link to="/hour/index">
              <div class="menudiv">
                <i class="icon iconfont icon-huizongtongjiguanli"></i>
                <div>课程汇总</div>
              </div>
            </router-link>
          </li>
          <li class="menuitem">
            <div class="menudiv">
              <el-popover placement="right" :width="50" trigger="click">
                <template #reference>
                  <div>
                    <i class="icon iconfont icon-dongtai"></i>
                    <div>学校动态</div>
                  </div>
                </template>
                <div class="sub-menu">
                  <div index="/admin/classroom/index">动态管理</div>
                  <div index="/admin/teacher/index">轮播图</div>
                  <div index="/admin/campus/index">学校介绍</div>
                  <div index="/admin/account/index">联系方式</div>
                  <router-link to="/campus/index">
                    <div>校区管理</div>
                  </router-link>
                </div>
              </el-popover>
            </div>
          </li>
          <li class="menuitem">
            <div class="menudiv">
              <el-popover placement="right" :width="50" trigger="click">
                <template #reference>
                  <div>
                    <i class="icon iconfont icon-shezhi01"></i>
                    <div>其他设置</div>
                  </div>
                </template>
                <div class="sub-menu">
                  <router-link to="/course/index">
                    <div>课程管理</div>
                  </router-link>
                  <router-link to="/classroom/index">
                    <div>教室管理</div>
                  </router-link>
                  <router-link to="/teacher/index">
                    <div>教师管理</div>
                  </router-link>
                  <router-link to="/account/index">
                    <div>账号管理</div>
                  </router-link>
                </div>
              </el-popover>
            </div>
          </li>
        </ul>
      </el-aside>
      <el-main>
        <router-view />
      </el-main>
    </el-container>
  </el-container>
</template>

<script>
export default {
  name: "Home",
  data() {
    return {
      wpList: [
        {
          id: 1,
          name: "首页",
          link: "musician",
        },
        {
          id: 2,
          name: "学员管理",
          link: "",
        },
        {
          id: 3,
          name: "班级管理",
          link: "",
        },
        {
          id: 4,
          name: "考勤管理",
          link: "",
        },
        {
          id: 5,
          name: "课程汇总",
          link: "",
        },
      ],
      active: "",
    };
  },
  methods: {
    outlogin() {
      // 清空token
      window.sessionStorage.clear();
      // 跳转到登录页
      this.$router.push("/");
    },
    selected(name) {
      this.active = name;
    },
  },
  computed: {},
  mounted() {},
};
</script>

<style scoped>
.el-container {
  width: 100%;
  height: 100%;
  /* background-color: #f1f2f6; */
}
.el-header {
  height: 52px;
  background-color: #fff;
  border-bottom: 1px solid #dee3e9;
  position: fixed;
  left: 0;
  top: 0;
  background-color: #fff;
  width: 100%;
  z-index: 2000;
  min-width: 800px;
}
.el-header .head-left {
  float: left;
}
.el-header .head-left img {
  margin-top: 10px;
  width: auto;
  float: left;
  height: 40px;
  margin-left: 10px;
}
.el-header .head-left h1 {
  display: inline-block;
  font-size: 20px;
  font-weight: 400;
  margin-top: 10px;
  margin-left: 10px;
  text-align: center;
  line-height: 38px;
}
.el-header .head-right {
  line-height: 60px;
  float: right;
  display: flex;
}
.el-header .head-right .right-txt {
  font-size: 12px;
}
.el-header .head-right > .user {
  font-size: 20px;
  margin-top: 20px;
  margin-left: 10px;
  margin-right: 4px;
}
li,
ul {
  list-style: none;
}
.el-aside {
  padding: 0;
  overflow: visible;
  background-color: #fff;
  border-right: 1px solid #f8f9fd;
  box-shadow: 6px 2px 20px rgb(163 162 162 / 30%);
  z-index: 1999;
  position: fixed;
  left: 0;
  overflow: visible;
  top: 52px;
  bottom: 0;
  background-color: #fff;
  padding-top: 5px;
  box-sizing: border-box;
}
.el-aside .menuitem.active {
  background-color: #fff;
}
.el-aside .menuitem {
  display: block;
  cursor: pointer;
  border-radius: 4px;
  background-color: #fff;
  margin: 5px 0;
  line-height: 20px;
}
.el-aside .menuitem .menudiv {
  margin-left: 10px;
  margin-right: 10px;
  margin-top: 2px;
  height: 56px;
  border-radius: 4px;
  background-color: #fff;
  box-sizing: border-box;
}
.el-aside .menuitem .menudiv .iconfont {
  font-family: "iconfont" !important;
  font-size: 28px;
  font-style: normal;
  line-height: 40px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.el-aside .menuitem .menudiv i {
  font-size: 28px;
  margin-top: 10px;
}
.el-aside .menuitem .menudiv div {
  font-size: 12px;
}
.el-main {
  color: #333;
  padding: 0;
  margin-top: 60px;
  margin-left: 100px;
  min-width: 800px;
  overflow-x: hidden;
}
a {
  text-decoration: none;
  color: #505e7a;
}
/* 高亮类 */
.active {
  background-color: #e8ebf0;
}
@font-face {
  font-family: "iconfont"; /* Project id 2647016 */
  src: url("//at.alicdn.com/t/font_2647016_ov90lb4rujr.woff2?t=1625193941604")
      format("woff2"),
    url("//at.alicdn.com/t/font_2647016_ov90lb4rujr.woff?t=1625193941604")
      format("woff"),
    url("//at.alicdn.com/t/font_2647016_ov90lb4rujr.ttf?t=1625193941604")
      format("truetype");
}

.iconfont {
  font-family: "iconfont" !important;
  font-size: 16px;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.icon-huizongtongjiguanli:before {
  font-size: 23px;
  content: "\e7d3";
  color: #b7c3dd;
}

.icon-shezhi01:before {
  content: "\e64b";
  color: #b7c3dd;
}

.icon-kaoqinguanli:before {
  content: "\e60f";
  color: #b7c3dd;
}

.icon-banjiguanli:before {
  content: "\e605";
  color: #b7c3dd;
}

.icon-yixiangxueyuan:before {
  content: "\e72c";
  color: #b7c3dd;
}

.icon-dongtai:before {
  content: "\e611";
  color: #b7c3dd;
}

.icon-home:before {
  content: "\e61e";
  color: #b7c3dd;
}
</style>